#include <iostream>

using namespace std;

class A
{
public:
    virtual void func1()
    {
        cout << "222" << endl;
    }
};

void normal()
{
    cout << "666" << endl;
}

int main()
{
    static int a = 1;
    int b = 1;
    int *p = new int;
    const char* str = "hello world";
    A op;
    printf("静态区：%p\n", &a);
    printf("栈区：%p\n", &b);
    printf("堆区：%p\n", p);
    printf("常量区：%p\n", str);
    printf("普通函数：%p\n", normal);
    printf("虚函数：%p\n", &A::func1);
    printf("虚表：%p\n", *((int*)&op));
    return 0;
}